import http from '../../utils/http'

Page({

    /**
     * 页面的初始数据
     */
    data: {
        orderDetail: {},
        team: {},
        isFirstLoading: true,
        type: 0,
        cancelTime: 0,
        showCancel: "",
        showLoading: false
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        this.getOrderDetails(options.id)
    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {
        
    },

    async getOrderDetails(id) {
        
        let res = await http.request('/api/mall/omsorder/getOrderInfo/'+id,)
        let orderDetail = res.data
        this.setData({ orderDetail })
        console.log(orderDetail);
        
        // let res = await http.request('http://likeshopv2.yixiangonline.com/api/order/detail', {id}, {
        //     headers: {
        //         token: 'd74120e227ab2c0ee5744d77a96991af'
        //     }
        // })
        // let orderDetail = res.data
        // this.setData({ orderDetail })
    },

   
})